:root,
:host {
  --van-index-anchor-z-index: 1;
  --van-index-anchor-padding: 0 var(--van-padding-md);
  --van-index-anchor-text-color: var(--van-text-color);
  --van-index-anchor-font-weight: var(--van-font-bold);
  --van-index-anchor-font-size: var(--van-font-size-md);
  --van-index-anchor-line-height: 32px;
  --van-index-anchor-background: transparent;
  --van-index-anchor-sticky-text-color: var(--van-primary-color);
  --van-index-anchor-sticky-background: var(--van-background-2);
}

.van-index-anchor {
  z-index: var(--van-index-anchor-z-index);
  box-sizing: border-box;
  padding: var(--van-index-anchor-padding);
  color: var(--van-index-anchor-text-color);
  font-weight: var(--van-index-anchor-font-weight);
  font-size: var(--van-index-anchor-font-size);
  line-height: var(--van-index-anchor-line-height);
  background: var(--van-index-anchor-background);

  &--sticky {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    color: var(--van-index-anchor-sticky-text-color);
    background: var(--van-index-anchor-sticky-background);
  }
}
